package com.eliasbalasis.dwr4gwt.example;

import java.util.Date;

import org.directwebremoting.annotations.DataTransferObject;
import org.directwebremoting.annotations.RemoteProperty;

//identical structure with com.eliasbalasis.tibcopagebus4gwt.testsubscriber.client.Person

@DataTransferObject
public class Person {
	private String name;
	private String description;
	private int intValue;
	private Date dateValue;
	private float floatValue;
	private double doubleValue;
	private boolean booleanValue;

	@RemoteProperty
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	@RemoteProperty
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}

	@RemoteProperty
	public int getIntValue() {
		return intValue;
	}
	public void setIntValue(int intValue) {
		this.intValue = intValue;
	}

	@RemoteProperty
	public Date getDateValue() {
		return dateValue;
	}
	public void setDateValue(Date dateValue) {
		this.dateValue = dateValue;
	}

	@RemoteProperty
	public float getFloatValue() {
		return floatValue;
	}
	public void setFloatValue(float floatValue) {
		this.floatValue = floatValue;
	}

	@RemoteProperty
	public double getDoubleValue() {
		return doubleValue;
	}
	public void setDoubleValue(double doubleValue) {
		this.doubleValue = doubleValue;
	}

	@RemoteProperty
	public boolean getBooleanValue() {
		return booleanValue;
	}
	public void setBooleanValue(boolean booleanValue) {
		this.booleanValue = booleanValue;
	}

	public String toString() {
		return
			"\tName = "+getName()+"\n"+
			"\tDescription = "+getDescription()+"\n"+
			"\tintValue = "+new Integer(getIntValue()).toString()+"\n"+
			"\tfloatValue = "+new Float(getFloatValue()).toString()+"\n"+
			"\tdoubleValue = "+new Double(getDoubleValue()).toString()+"\n"+
			"\tbooleanValue = "+new Boolean(getBooleanValue()).toString()+"\n"+
			"\tdateValue = "+getDateValue().toString()+"\n";
	}
}
